Typical computer storage devices, such as hard disk drives (HDDs), solid state drives (SSDs), and hybrid drives, have controllers that receive data access requests from host computers and perform programmed computing tasks to implement the requests in ways that may be specific to the media and structure configured in the storage devices, such as rigid rotating disks coated with magnetic material in the hard disk drives, integrated circuits having memory cells in solid state drives, and both in hybrid drives.
A standardized logical device interface protocol allows a host computer to address a computer storage device in a way independent from the specific media implementation of the storage device. For example, Non-Volatile Memory Host Controller Interface Specification (NVMHCI), also known as NVM Express (NVMe), specifies the logical device interface protocol for accessing non-volatile storage devices via a Peripheral Component Interconnect Express (PCI Express or PCIe) bus.
Some erasable computer storage media, such as Compact Disc-ReWritable, DVD recordable, DVD-RAM, electrically erasable programmable read-only memory (EEPROM), and/or flash memory, have useful service periods limited by the cycles of program and erase to store data. An erasure operation is performed to clear or erase the existing data stored in a memory unit; and a programming operation is performed to store, write, or program new data into the memory unit.
A program erase (P/E) budget represents a predetermined number of cycles of program and erase that can be performed reliably for recording data in such an erasable medium. After the predetermined of cycles of erasure, the program erase (P/E) budget of such the erasable medium is used up; and as a result, the medium may become unreliable in a statistical sense and thus is considered at the end of its useful service life.
A solid state drive (SSD) typically has many memory units structured in the hierarchies of pages and blocks. A block of memory units has multiple pages of memory units. Different pages in a block can be independently programmed. However, different pages in a same block need to be erased together; and a page having been previously programmed needs to be erased before being programmed again to store new data.
When a block has some pages that are free to be programmed and some pages that have data to be modified, the solid state drive (SSD) may mark the pages that need to be modified as having invalid data, program free pages to store the modified data, and update the mapping between the logical addresses used by the host computer to identify data storage locations and the physical addresses of the memory units that actually store the data. To store data in pages that have invalid data, it is typically necessary to erase the pages by erasing the block as a whole, which would erase other blocks that have valid data.
When a block has some pages containing valid data and other pages containing invalid data, the valid data can be copied from the pages in the block to another location such that the entire block can be erased for programming. Such a process to erase pages containing invalid data and make them usable for storing new data is referred to as garbage collection.
The degree of wearing of each memory block is proportional to the number of erasure operations performed on the memory block. Wear leveling can be performed in a solid state drive such that the operations of erasure are distributed across the memory blocks in the solid state drive.
Garbage collection and/or wear leveling can lead to the movement of a data item programmed at one location to another in the storage device one or more times during the life cycle of a data item, causing multiple times of write operations of the data item. Such an effect is referred to as write amplification, which can reduce the useful life of the storage device.